// 主体管理相关接口
import request from '@/utils/request'
import { withPrefix, Method } from '@/service'

// 获取主体列表
export const payeeAccountList = (data) => {
  return request({
    url: withPrefix('/api/finance/payeeAccount/v1/list'),
    method: Method.POST,
    data
  })
}

// 创建收款主体
export const createPayeeAccount = (data) => {
  return request({
    url: withPrefix('/api/finance/payeeAccount/v1/create'),
    method: Method.POST,
    data
  })
}

// 编辑收款主体
export const editPayeeAccount = (data) => {
  return request({
    url: withPrefix('/api/finance/payeeAccount/v1/update'),
    method: Method.POST,
    data
  })
}

// 查看收款主体
export const viewPayeeAccount = (data) => {
  return request({
    url: withPrefix('/api/finance/payeeAccount/v1/view'),
    method: Method.POST,
    data
  })
}

// 创建主体银行
export const createBankAccount = data => {
  return request({
    url: withPrefix('/api/finance/payeeAccountItem/v1/create'),
    method: Method.POST,
    data
  })
}

// 删除收款主体账户详情
export const deleteAccount = data => {
  return request({
    url: withPrefix('/api/finance/payeeAccountItem/v1/delete'),
    method: Method.POST,
    data
  })
}

// 查询主体银行列表
export const queryAccountList = data => {
  return request({
    url: withPrefix('/api/finance/payeeAccountItem/v1/queryList'),
    method: Method.POST,
    data
  })
}

// 编辑主体银行
export const updateAccount = data => {
  return request({
    url: withPrefix('/api/finance/payeeAccountItem/v1/update'),
    method: Method.POST,
    data
  })
}

// 获取主体银行详情
export const viewAccount = data => {
  return request({
    url: withPrefix('/api/finance/payeeAccountItem/v1/view'),
    method: Method.POST,
    data
  })
}
